package com.design.pattern.adapter.objectpattern;

import com.design.pattern.adapter.DataLine;
import com.design.pattern.adapter.PowerStrip;

/**
 * 笔记本适配器(连接数据线和插排的桥梁)
 * @author liangliang
 */
public class NoteBookAdapter implements PowerStrip {
    private DataLine pdl;

    NoteBookAdapter(DataLine pdl) {
        this.pdl = pdl;
    }

    public void charger(String name) {
        pdl.input();
        System.out.println(name + "插入适配器，正在充电");
    }
}
